#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int bits( int value)

{

	int count = 0;

	while (value)

	{

		if (value & 1)

		{

			count++;

			value = value >> 1;

		}
	}
	return count;
}



int main()

{
	int x, y = 0;
	scanf("%d%d", &x, &y);
	int value = x ^ y;
	int count = bits(value);
	printf("%d\n", count);
	return 0;
}